package com.training.java.core.collections.post15.Set.Television;

public class Television {
	private String company;
	private String type;
	private boolean enabled3D;
	private int price;

	public Television(String company, String type, boolean enabled3D) {

		this.company = company;
		this.type = type;
		this.enabled3D = enabled3D;
	}

	public String getCompany() {
		return company;
	}

	public String getType() {
		return type;
	}

	public boolean isenabled3D() {
		return enabled3D;
	}

	public int getPrice() {
		return price;
	}

	@Override
	public boolean equals(Object obj) {

		Television that = (Television) obj;
		if (this.getCompany().equals(that.getCompany())
				&& this.getType().equals(that.getType())
				&& this.isenabled3D() == (that.isenabled3D()))
			return true;
		else
			return false;

	}

	@Override
	public int hashCode() {

		return this.getCompany().hashCode();
	}
}
